#ifndef TYPES_H
#define TYPES_H

#include <chrono>
#include <cstdint>
#include <string>
#include <systemd/sd-journal.h>



enum class SystemState {
    IDLE,
    CAPTURE,
    TAIL_CAPTURE,
    OFFLINE_PROCESSING
};

enum class CameraId {
    CAMERA_A,
    CAMERA_B
};

struct FrameInfo {
    CameraId cam_id;
    uint64_t timestamp;  // 毫秒级时间戳
    uint32_t frame_num;
    std::string path;    // 帧数据存储路径
};

struct StrikeEvent {
    uint64_t timestamp;  // 击球时间戳
};

struct CaptureConfig {
    CameraId cam_id;
    uint32_t width;
    uint32_t height;
    uint32_t fps;
    uint32_t cache_duration;  // 缓存时长(秒)
    uint32_t pre_strike;      // 保留击球前时长(秒)
    uint32_t post_strike;     // 保留击球后时长(秒)
};

#endif // TYPES_H